# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=formatstringexploiter
pkgver=107.2810293
pkgrel=5
groups=('blackarch' 'blackarch-exploitation')
pkgdesc='Helper script for working with format string bugs.'
arch=('any')
url='https://github.com/Owlz/formatStringExploiter'
license=('custom:unknown')
depends=('python' 'python-prettytable' 'python-pwntools' 'python-pytest'
         'python-recommonmark' 'python-sphinx' 'python-sphinx_rtd_theme'
         'python-sphinxcontrib-napoleon')
makedepends=('git' 'python-setuptools')
source=("$pkgname::git+https://github.com/Owlz/formatStringExploiter.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

